<!DOCTYPE html>
<html>
<head>
	<!-- Global site tag (gtag.js) - Google Analytics -->
	<script async src="https://www.googletagmanager.com/gtag/js?id='UA-133422980-2"></script>
	<script>
	  window.dataLayer = window.dataLayer || [];
	  function gtag(){dataLayer.push(arguments);}
	  gtag('js', new Date());

	  gtag('config', 'UA-133422980-2');
	</script>

	<meta charset="utf-8">
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<title>
		gem5: X86 Micro-op ISA 
	</title>

	<!-- SITE FAVICON -->
	<link rel="shortcut icon" type="image/gif" href="/assets/img/gem5ColorVert.gif"/>

	<link rel="canonical" href="http://localhost:4000/documentation/general_docs/architecture_support/x86_microop_isa/">
	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600' rel='stylesheet' type='text/css'>
	<link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>

	<!-- FAVICON -->
	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

	<!-- BOOTSTRAP -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

	<!-- CUSTOM CSS -->
	<link rel="stylesheet" href="/css/main.css">
</head>


<body>
	<nav class="navbar navbar-expand-md navbar-light bg-light">
  <a class="navbar-brand" href="/">
		<img src="/assets/img/gem5ColorLong.gif" alt="gem5" height=55px>
	</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarNavDropdown">
    <!-- LIST FOR NAVBAR -->
    <ul class="navbar-nav ml-auto">
      <!-- HOME -->
      <li class="nav-item ">
        <a class="nav-link" href="/">Home</a>
      </li>

      <!-- ABOUT -->
			<li class="nav-item dropdown ">
				<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					About
				</a>
				<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
          <a class="dropdown-item" href="/about">About gem5</a>
          <a class="dropdown-item" href="/publications">Publications</a>
          <a class="dropdown-item" href="/governance">Governance</a>
				</div>
			</li>

      <!-- DOCUMENTATION -->
			<li class="nav-item dropdown active">
				<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					Documentation
				</a>
				<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
					<!-- Pull navigation from _data/documentation.yml -->
					
            <a class="dropdown-item" href="/documentation">gem5 documentation</a>
					
            <a class="dropdown-item" href="/documentation/learning_gem5/introduction">Learning gem5</a>
					
            <a class="dropdown-item" href="http://doxygen.gem5.org/release/current/index.html">gem5 Doxygen</a>
					
            <a class="dropdown-item" href="/documentation/reporting_problems">Reporting Problems</a>
					
				</div>
			</li>

      <!-- EVENTS -->
			<li class="nav-item dropdown ">
        <a class="nav-link" href="/events/">Events</a>
			</li>

      <!-- CONTRIBUTING -->
      <li class="nav-item ">
        <a class="nav-link" href="/contributing">Contributing</a>
      </li>

      <!-- BLOG -->
      <li class="nav-item ">
        <a class="nav-link" href="/blog">Blog</a>
      </li>

      <!-- SEARCH -->
			<li class="nav-item ">
        <a class="nav-link" href="/search">Search</a>
      </li>
    </ul>
  </div>
</nav>

	<main>
		<div class="sidenav-top">
  <div class="sidenav-brand bg-light">
    <a href="/"><img src="/assets/img/gem5ColorLong.gif" height="55px"></a>
  </div>
  <div class="search">
    <form action="/search" method="get">
      <!-- <label for="search-box"><i class="fa fa-search"></i></label> -->
      <input type="text" name="query">
      <button type="submit" name="submit"><i class="fa fa-search"></i></button>
    </form>
  </div>
</div>
<div class="sidenav">
  <!-- Pull navigation from _data/documentation.yml -->
  
    
    
      <a class="item" href="/documentation" role="button" aria-expanded="false" aria-controls="collapseExample">
        gem5 documentation
      </a>
      <div class="collapse " id="gem5_documentation">
        
      </div>
    
      <a class="item" href="/documentation/general_docs/development/coding_style/" role="button" aria-expanded="false" aria-controls="collapseExample">
        Code Style
      </a>
      <div class="collapse " id="code_style">
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#building" role="button" aria-expanded="false" aria-controls="collapseExample">
        Building
      </a>
      <div class="collapse " id="building">
        
          <a class="subitem " href="/documentation/general_docs/building">Building</a>
        
          <a class="subitem " href="/documentation/general_docs/building/EXTRAS">Building EXTRAS</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#doxygen-docs" role="button" aria-expanded="false" aria-controls="collapseExample">
        Doxygen
      </a>
      <div class="collapse " id="doxygen-docs">
        
          <a class="subitem " href="http://doxygen.gem5.org/develop/index.html">Develop Branch</a>
        
          <a class="subitem " href="http://doxygen.gem5.org/release/v19-0-0-0/index.html">v19.0.0.0</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#fullsystem" role="button" aria-expanded="false" aria-controls="collapseExample">
        Full System
      </a>
      <div class="collapse " id="fullsystem">
        
          <a class="subitem " href="/documentation/general_docs/fullsystem/disks">Creating Disk Images</a>
        
          <a class="subitem " href="/documentation/general_docs/fullsystem/devices">Devices</a>
        
          <a class="subitem " href="/documentation/general_docs/fullsystem/m5term">m5term</a>
        
          <a class="subitem " href="/documentation/general_docs/fullsystem/building_arm_kernel">Building Linux ARM Kernel</a>
        
          <a class="subitem " href="/documentation/general_docs/fullsystem/building_android_m">Building Android Marshmallow</a>
        
          <a class="subitem " href="/documentation/general_docs/fullsystem/guest_binaries">Guest binaries</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#memory_system" role="button" aria-expanded="false" aria-controls="collapseExample">
        Memory System
      </a>
      <div class="collapse " id="memory_system">
        
          <a class="subitem " href="/documentation/general_docs/memory_system/">Memory System</a>
        
          <a class="subitem " href="/documentation/general_docs/memory_system/gem5_memory_system">gem5 Memory System</a>
        
          <a class="subitem " href="/documentation/general_docs/memory_system/replacement_policies">Replacement Policies</a>
        
          <a class="subitem " href="/documentation/general_docs/memory_system/indexing_policies">Indexing Policies</a>
        
          <a class="subitem " href="/documentation/general_docs/memory_system/classic-coherence-protocol">Classic memory system coherence</a>
        
          <a class="subitem " href="/documentation/general_docs/memory_system/classic_caches">Classic caches</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#ruby" role="button" aria-expanded="false" aria-controls="collapseExample">
        Ruby Memory System
      </a>
      <div class="collapse " id="ruby">
        
          <a class="subitem " href="/documentation/general_docs/ruby">Ruby</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/cache-coherence-protocols">Cache Coherence Protocols</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/garnet-2">Garnet 2.0</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/MOESI_CMP_directory">MOESI CMP directory</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/garnet_synthetic_traffic">Garnet Synthetic Traffic</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/slicc">SLICC</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/MI_example">MI example</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/Garnet_standalone">Garnet standalone</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/interconnection-network">Interconnection network</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/MOESI_hammer">MOESI hammer</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/MOESI_CMP_token">MOESI CMP token</a>
        
          <a class="subitem " href="/documentation/general_docs/ruby/MESI_Two_Level">MESI two level</a>
        
          <a class="subitem " href="/documentation/general_docs/memory_system/replacement_policies">Replacement Policies</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#cpu_models" role="button" aria-expanded="false" aria-controls="collapseExample">
        CPU Models
      </a>
      <div class="collapse " id="cpu_models">
        
          <a class="subitem " href="/documentation/general_docs/cpu_models/SimpleCPU">SimpleCPU</a>
        
          <a class="subitem " href="/documentation/general_docs/cpu_models/O3CPU">O3CPU</a>
        
          <a class="subitem " href="/documentation/general_docs/cpu_models/TraceCPU">TraceCPU</a>
        
          <a class="subitem " href="/documentation/general_docs/cpu_models/minor_cpu">Minor CPU Model</a>
        
          <a class="subitem " href="/documentation/general_docs/cpu_models/execution_basics">Execution Basics</a>
        
          <a class="subitem " href="/documentation/general_docs/cpu_models/visualization">Visualization</a>
        
      </div>
    
      <a class="item" href="/documentation/general_docs/m5ops" role="button" aria-expanded="false" aria-controls="collapseExample">
        M5ops
      </a>
      <div class="collapse " id="m5ops">
        
      </div>
    
      <a class="item" href="/documentation/general_docs/checkpoints" role="button" aria-expanded="false" aria-controls="collapseExample">
        Checkpoints
      </a>
      <div class="collapse " id="checkpoints">
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#directed_testers" role="button" aria-expanded="false" aria-controls="collapseExample">
        Directed Testers
      </a>
      <div class="collapse " id="directed_testers">
        
          <a class="subitem " href="/documentation/general_docs/debugging_and_testing/directed_testers/garnet_synthetic_traffic">Garnet Synthetic Traffic</a>
        
          <a class="subitem " href="/documentation/general_docs/debugging_and_testing/directed_testers/ruby_random_tester">Ruby Random Tester</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#debugging" role="button" aria-expanded="false" aria-controls="collapseExample">
        Debugging
      </a>
      <div class="collapse " id="debugging">
        
          <a class="subitem " href="/documentation/general_docs/debugging_and_testing/debugging/trace_based_debugging">Trace-based Debugging</a>
        
          <a class="subitem " href="/documentation/general_docs/debugging_and_testing/debugging/debugger_based_debugging">Debugger-based Debugging</a>
        
          <a class="subitem " href="/documentation/general_docs/debugging_and_testing/debugging/debugging_simulated_code">Debugging Simulated Code</a>
        
          <a class="subitem " href="/documentation/reporting_problems">Reporting Problems</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#architecture_support" role="button" aria-expanded="false" aria-controls="collapseExample">
        Architecture Support
      </a>
      <div class="collapse show" id="architecture_support">
        
          <a class="subitem " href="/documentation/general_docs/architecture_support/">Architecture Support</a>
        
          <a class="subitem " href="/documentation/general_docs/architecture_support/arm_implementation/">ARM Implementation</a>
        
          <a class="subitem " href="/documentation/general_docs/architecture_support/isa_parser/">ISA Parser</a>
        
          <a class="subitem " href="/documentation/general_docs/architecture_support/x86_microop_isa/">X86 microop ISA</a>
        
      </div>
    
      <a class="item" href="/documentation/general_docs/thermal_model" role="button" aria-expanded="false" aria-controls="collapseExample">
        Power and Thermal Model
      </a>
      <div class="collapse " id="">
        
      </div>
    
      <a class="item" href="/documentation/general_docs/compiling_workloads/" role="button" aria-expanded="false" aria-controls="collapseExample">
        Compiling Workloads
      </a>
      <div class="collapse " id="compiling_workloads">
        
      </div>
    
      <a class="item" href="/documentation/general_docs/statistics/" role="button" aria-expanded="false" aria-controls="collapseExample">
        Stats Package
      </a>
      <div class="collapse " id="statistics">
        
      </div>
    
    
  
    
  
    
  
    
  
</div>


<div class="container" id="doc-container">
  <div class="edit"><a href="https://gem5.googlesource.com/public/gem5-website/+/refs/heads/master/README.md">Edit this page</a></div>
  
  

  <br>
  <h1 id="register-ops">Register Ops</h1>
<p>These microops typically take two sources and produce one result. Most have a version that operates on only registers and a version which operates on registers and an immediate value. Some optionally set flags according to their operation. Some of them can be predicated.</p>

<h3 id="add">Add</h3>
<p>Addition.</p>

<h4 id="add-dest-src1-src2">add Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 + Src2</p>

<p>Adds the contents of the Src1 and Src2 registers and puts the result in the Dest register.</p>

<h4 id="addi-dest-src1-imm">addi Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 + Imm</p>

<p>Adds the contents of the Src1 register and the immediate Imm and puts the result in the Dest register.</p>

<h4 id="flags">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The carry out of the most significant bit.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>The carry from the fourth to fifth bit positions.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Whether there was an overflow.</td>
    </tr>
  </tbody>
</table>

<h3 id="adc">Adc</h3>
<p>Add with carry.</p>

<h4 id="adc-dest-src1-src2">adc Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 + Src2 + CF</p>

<p>Adds the contents of the Src1 and Src2 registers and the carry flag and puts the result in the Dest register.</p>

<h4 id="adci-dest-src1-imm">adci Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 + Imm + CF</p>

<p>Adds the contents of the Src1 register, the immediate Imm, and the carry flag and puts the result in the Dest register.</p>

<h4 id="flags-1">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The carry out of the most significant bit.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>The carry from the fourth to fifth bit positions.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Whether there was an overflow.</td>
    </tr>
  </tbody>
</table>

<h3 id="sub">Sub</h3>
<p>Subtraction.</p>

<h4 id="sub-dest-src1-src2">sub Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 - Src2</p>

<p>Subtracts the contents of the Src2 register from the Src1 register and puts the result in the Dest register.</p>

<h4 id="subi-dest-src1-imm">subi Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 - Imm</p>

<p>Subtracts the contents of the immediate Imm from the Src1 register and puts the result in the Dest register.</p>

<h4 id="flags-2">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The borrow into of the most significant bit.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>The borrow from the fourth to fifth bit positions.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Whether there was an overflow.</td>
    </tr>
  </tbody>
</table>

<h3 id="sbb">Sbb</h3>

<p>Subtract with borrow.</p>

<h4 id="sbb-dest-src1-src2">sbb Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 - Src2 - CF</p>

<p>Subtracts the contents of the Src2 register and the carry flag from the Src1 register and puts the result in the Dest register.</p>

<h4 id="sbbi-dest-src1-imm">sbbi Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 - Imm - CF</p>

<p>Subtracts the immediate Imm and the carry flag from the Src1 register and puts the result in the Dest register.</p>

<h4 id="flags-3">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The borrow into of the most significant bit.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>The borrow from the fourth to fifth bit positions.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Whether there was an overflow.</td>
    </tr>
  </tbody>
</table>

<h3 id="mul1s">Mul1s</h3>

<p>Signed multiply.</p>

<h4 id="mul1s-src1-src2">mul1s Src1, Src2</h4>
<p>ProdHi:ProdLo # Src1 * Src2</p>

<p>Multiplies the unsigned contents of the Src1 and Src2 registers and puts the high and low portions of the product into the internal registers ProdHi and ProdLo, respectively.</p>

<h4 id="mul1si-src1-imm">mul1si Src1, Imm</h4>
<p>ProdHi:ProdLo # Src1 * Imm</p>

<p>Multiplies the unsigned contents of the Src1 register and the immediate Imm and puts the high and low portions of the product into the internal registers ProdHi and ProdLo, respectively.</p>

<h4 id="flags-4">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="mul1u">Mul1u</h3>

<p>Unsigned multiply.</p>

<h4 id="mul1u-src1-src2">mul1u Src1, Src2</h4>
<p>ProdHi:ProdLo # Src1 * Src2</p>

<p>Multiplies the unsigned contents of the Src1 and Src2 registers and puts the high and low portions of the product into the internal registers ProdHi and ProdLo, respectively.</p>

<h4 id="mul1ui-src1-imm">mul1ui Src1, Imm</h4>
<p>ProdHi:ProdLo # Src1 * Imm</p>

<p>Multiplies the unsigned contents of the Src1 register and the immediate Imm and puts the high and low portions of the product into the internal registers ProdHi and ProdLo, respectively.</p>

<h4 id="flags-5">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="mulel">Mulel</h3>

<p>Unload multiply result low.</p>

<h4 id="mulel-dest">mulel Dest</h4>
<p>Dest # Dest &lt;- ProdLo</p>

<p>Moves the value of the internal ProdLo register into the Dest register.</p>

<h4 id="flags-6">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="muleh">Muleh</h3>

<p>Unload multiply result high.</p>

<h4 id="muleh-dest">muleh Dest</h4>
<p>Dest # Dest &lt;- ProdHi</p>

<p>Moves the value of the internal ProdHi register into the Dest register.</p>

<h4 id="flags-7">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>Whether ProdHi is non-zero.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Whether ProdHi is zero.</td>
    </tr>
  </tbody>
</table>

<h3 id="div1">Div1</h3>

<p>First stage of division.</p>

<h4 id="div1-src1-src2">div1 Src1, Src2</h4>
<p>Quotient * Src2 + Remainder # Src1
Divisor # Src2</p>

<p>Begins a division operation where the contents of SrcReg1 is the high part of the dividend and the contents of SrcReg2 is the divisor. The remainder from this partial division is put in the internal register Remainder. The quotient is put in the internal register Quotient. The divisor is put in the internal register Divisor.</p>

<h4 id="div1i-src1-imm">div1i Src1, Imm:</h4>
<p>Quotient * Imm + Remainder # Src1
Divisor # Imm</p>

<p>Begins a division operation where the contents of SrcReg1 is the high part of the dividend and the immediate Imm is the divisor. The remainder from this partial division is put in the internal register Remainder. The quotient is put in the internal register Quotient. The divisor is put in the internal register Divisor.</p>

<h4 id="flags-8">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="div2">Div2</h3>

<p>Second and later stages of division.</p>

<h4 id="div2-dest-src1-src2">div2 Dest, Src1, Src2</h4>
<p>Quotient * Divisor + Remainder # original Remainder with bits shifted in from Src1</p>

<p>Dest # Dest &lt;- Src2 - number of bits shifted in above</p>

<p>Performs subsequent steps of division following a div1 instruction. The contents of the register Src1 is the low portion of the dividend. The contents of the register Src2 denote the number of bits in Src1 that have not yet been used before this step in the division. Dest is set to the number of bits in Src1 that have not been used after this step. The internal registers Quotient, Divisor, and Remainder are updated by this instruction.</p>

<p>If there are no remaining bits in Src1, this instruction does nothing except optionally compute flags.</p>

<h4 id="div2i-dest-src1-imm">div2i Dest, Src1, Imm</h4>
<p>Quotient * Divisor + Remainder # original Remainder with bits shifted in from Src1</p>

<p>Dest # Dest &lt;- Imm - number of bits shifted in above</p>

<p>Performs subsequent steps of division following a div1 instruction. The contents of the register Src1 is the low portion of the dividend. The immediate Imm denotes the number of bits in Src1 that have not yet been used before this step in the division. Dest is set to the number of bits in Src1 that have not been used after this step. The internal registers Quotient, Divisor, and Remainder are updated by this instruction.</p>

<p>If there are no remaining bits in Src1, this instruction does nothing except optionally compute flags.</p>

<h4 id="flags-9">Flags</h4>
<p>This microop optionally sets the EZF flag.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>EZF</td>
      <td>Whether there are any remaining bits in Src1 after this step.</td>
    </tr>
  </tbody>
</table>

<h3 id="divq">Divq</h3>

<p>Unload division quotient.</p>

<h4 id="divq-dest">divq Dest</h4>
<p>Dest # Dest &lt;- Quotient</p>

<p>Moves the value of the internal Quotient register into the Dest register.</p>

<h4 id="flags-10">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="divr">Divr</h3>

<p>Unload division remainder.</p>

<h4 id="divr-dest">divr Dest</h4>
<p>Dest # Dest &lt;- Remainder</p>

<p>Moves the value of the internal Remainder register into the Dest register.</p>

<h4 id="flags-11">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="or">Or</h3>

<p>Logical or.</p>

<h4 id="or-dest-src1-src2">or Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 | Src2</p>

<p>Computes the bitwise or of the contents of the Src1 and Src2 registers and puts the result in the Dest register.</p>

<h4 id="ori-dest-src1-imm">ori Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 | Imm</p>

<p>Computes the bitwise or of the contents of the Src1 register and the immediate Imm and puts the result in the Dest register.</p>

<h4 id="flags-12">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.
There is nothing that prevents computing a value for the AF flag, but it’s value will be meaningless.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>Cleared.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>Undefined.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Cleared.</td>
    </tr>
  </tbody>
</table>

<h3 id="and">And</h3>

<p>Logical And</p>

<h4 id="and-dest-src1-src2">and Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 &amp; Src2</p>

<p>Computes the bitwise and of the contents of the Src1 and Src2 registers and puts the result in the Dest register.</p>

<h4 id="andi-dest-src1-imm">andi Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 &amp; Imm</p>

<p>Computes the bitwise and of the contents of the Src1 register and the immediate Imm and puts the result in the Dest register.</p>

<h4 id="flags-13">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.
There is nothing that prevents computing a value for the AF flag, but it’s value will be meaningless.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>Cleared.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>Undefined.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Cleared.</td>
    </tr>
  </tbody>
</table>

<h3 id="xor">Xor</h3>

<p>Logical exclusive or.</p>

<h4 id="xor-dest-src1-src2">xor Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 | Src2</p>

<p>Computes the bitwise xor of the contents of the Src1 and Src2 registers and puts the result in the Dest register.</p>

<h4 id="xori-dest-src1-imm">xori Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 | Imm</p>

<p>Computes the bitwise xor of the contents of the Src1 register and the immediate Imm and puts the result in the Dest register.</p>

<h4 id="flags-14">Flags</h4>
<p>This microop optionally sets the CF, ECF, ZF, EZF, PF, AF, SF, and OF flags.
There is nothing that prevents computing a value for the AF flag, but it’s value will be meaningless.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>Cleared.</td>
    </tr>
    <tr>
      <td>ZF and EZF</td>
      <td>Whether the result was zero.</td>
    </tr>
    <tr>
      <td>PF</td>
      <td>The parity of the result.</td>
    </tr>
    <tr>
      <td>AF</td>
      <td>Undefined.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The sign of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Cleared.</td>
    </tr>
  </tbody>
</table>

<h3 id="sll">Sll</h3>

<p>Logical left shift.</p>

<h4 id="sll-dest-src1-src2">sll Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 « Src2</p>

<p>Shifts the contents of the Src1 register to the left by the value in the Src2 register and writes the result into the Dest register. The shift amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="slli-dest-src1-imm">slli Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 « Imm</p>

<p>Shifts the contents of the Src1 register to the left by the value in the immediate Imm and writes the result into the Dest register. The shift amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-15">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the shift amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The last bit shifted out of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>The exclusive OR of what this instruction would set the CF flag to, if requested, and the most significant bit of the result.</td>
    </tr>
  </tbody>
</table>

<h3 id="srl">Srl</h3>

<p>Logical right shift.</p>

<h4 id="srl-dest-src1-src2">srl Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 »(logical) Src2</p>

<p>Shifts the contents of the Src1 register to the right by the value in the Src2 register and writes the result into the Dest register. Bits which are shifted in sign extend the result. The shift amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="srli-dest-src1-imm">srli Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 »(logical) Imm</p>

<p>Shifts the contents of the Src1 register to the right by the value in the immediate Imm and writes the result into the Dest register. Bits which are shifted in sign extend the result. The shift amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-16">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the shift amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The last bit shifted out of the result.</td>
    </tr>
    <tr>
      <td>SF</td>
      <td>The most significant bit of the original value to shift.</td>
    </tr>
  </tbody>
</table>

<h3 id="sra">Sra</h3>

<p>Arithmetic right shift.</p>

<h4 id="sra-dest-src1-src2">sra Dest, Src1, Src2</h4>
<p>Dest # Dest &lt;- Src1 »(arithmetic) Src2</p>

<p>Shifts the contents of the Src1 register to the right by the value in the Src2 register and writes the result into the Dest register. Bits which are shifted in zero extend the result. The shift amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="srai-dest-src1-imm">srai Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- Src1 »(arithmetic) Imm</p>

<p>Shifts the contents of the Src1 register to the right by the value in the immediate Imm and writes the result into the Dest register. Bits which are shifted in zero extend the result. The shift amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-17">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the shift amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The last bit shifted out of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>Cleared.</td>
    </tr>
  </tbody>
</table>

<h3 id="ror">Ror</h3>

<p>Rotate right.</p>

<h4 id="ror-dest-src1-src2">ror Dest, Src1, Src2</h4>
<p>Rotates the contents of the Src1 register to the right by the value in the Src2 register and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="rori-dest-src1-imm">rori Dest, Src1, Imm</h4>
<p>Rotates the contents of the Src1 register to the right by the value in the immediate Imm and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-18">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the rotate amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The most significant bit of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>The exclusive OR of the most two significant bits of the original value.</td>
    </tr>
  </tbody>
</table>

<h3 id="rcr">Rcr</h3>

<p>Rotate right through carry.</p>

<h4 id="rcr-dest-src1-src2">rcr Dest, Src1, Src2</h4>
<p>Rotates the contents of the Src1 register through the carry flag and to the right by the value in the Src2 register and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="rcri-dest-src1-imm">rcri Dest, Src1, Imm</h4>
<p>Rotates the contents of the Src1 register through the carry flag and to the right by the value in the immediate Imm and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-19">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the rotate amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The last bit shifted out of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>The exclusive OR of the CF flag before the rotate and the most significant bit of the original value.</td>
    </tr>
  </tbody>
</table>

<h3 id="rol">Rol</h3>

<p>Rotate left.</p>

<h4 id="rol-dest-src1-src2">rol Dest, Src1, Src2</h4>
<p>Rotates the contents of the Src1 register to the left by the value in the Src2 register and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="roli-dest-src1-imm">roli Dest, Src1, Imm</h4>
<p>Rotates the contents of the Src1 register to the left by the value in the immediate Imm and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-20">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the rotate amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The least significant bit of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>The exclusive OR of the most and least significant bits of the result.</td>
    </tr>
  </tbody>
</table>

<h3 id="rcl">Rcl</h3>

<p>Rotate left through carry.</p>

<h4 id="rcl-dest-src1-src2">rcl Dest, Src1, Src2</h4>
<p>Rotates the contents of the Src1 register through the carry flag and to the left by the value in the Src2 register and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="rcli-dest-src1-imm">rcli Dest, Src1, Imm</h4>
<p>Rotates the contents of the Src1 register through the carry flag and to the left by the value in the immediate Imm and writes the result into the Dest register. The rotate amount is truncated to either 5 or 6 bits, depending on the operand size.</p>

<h4 id="flags-21">Flags</h4>
<p>This microop optionally sets the CF, ECF, and OF flags. If the rotate amount is zero, no flags are modified.</p>

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CF and ECF</td>
      <td>The last bit rotated out of the result.</td>
    </tr>
    <tr>
      <td>OF</td>
      <td>The exclusive OR of CF before the rotate and the most significant bit of the result.</td>
    </tr>
  </tbody>
</table>

<h3 id="mov">Mov</h3>

<p>Move.</p>

<h4 id="mov-dest-src1-src2">mov Dest, Src1, Src2</h4>
<p>Dest # Src1 &lt;- Src2</p>

<p>Merge the contents of the Src2 register into the contents of Src1 and put the result into the Dest register.</p>

<h4 id="movi-dest-src1-imm">movi Dest, Src1, Imm</h4>
<p>Dest # Src1 &lt;- Imm</p>

<p>Merge the contents of the immediate Imm into the contents of Src1 and put the results into the Dest register.</p>

<h4 id="flags-22">Flags</h4>
<p>This microop does not set any flags. It is optionally predicated.</p>

<h3 id="sext">Sext</h3>

<p>Sign extend.</p>

<h4 id="sext-dest-src1-imm">sext Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- sign_extend(Src1, Imm)</p>

<p>Sign extend the value in the Src1 register starting at the bit position in the immediate Imm, and put the result in the Dest register.</p>

<h4 id="flags-23">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="zext">Zext</h3>

<p>Zero extend.</p>

<h4 id="zext-dest-src1-imm">zext Dest, Src1, Imm</h4>
<p>Dest # Dest &lt;- zero_extend(Src1, Imm)</p>

<p>Zero extend the value in the Src1 register starting at the bit position in the immediate Imm, and put the result in the Dest register.</p>

<h4 id="flags-24">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="ruflag">Ruflag</h3>

<p>Read user flag.</p>

<h4 id="ruflag-dest-imm">ruflag Dest, Imm</h4>
<p>Reads the user level flag stored in the bit position specified by the immediate Imm and stores it in the register Dest.</p>

<p>The mapping between values of Imm and user level flags is show in the following table.</p>

<table>
  <thead>
    <tr>
      <th>Imm</th>
      <th>Flag</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>CF (carry flag)</td>
    </tr>
    <tr>
      <td>2</td>
      <td>PF (parity flag)</td>
    </tr>
    <tr>
      <td>3</td>
      <td>ECF (emulation carry flag)</td>
    </tr>
    <tr>
      <td>4</td>
      <td>AF (auxiliary flag)</td>
    </tr>
    <tr>
      <td>5</td>
      <td>EZF (emulation zero flag)</td>
    </tr>
    <tr>
      <td>6</td>
      <td>ZF (zero flag)</td>
    </tr>
    <tr>
      <td>7</td>
      <td>CF (sign flag)</td>
    </tr>
    <tr>
      <td>10</td>
      <td>CF (direction flag)</td>
    </tr>
    <tr>
      <td>11</td>
      <td>CF (overflow flag)</td>
    </tr>
  </tbody>
</table>

<h4 id="flags-25">Flags</h4>
<p>The EZF flag is always set. In the future this may become optional.</p>

<h3 id="ruflags">Ruflags</h3>

<p>Read all user flags.</p>

<h4 id="ruflags-dest">ruflags Dest</h4>
<p>Dest # user flags</p>

<p>Store the user level flags into the Dest register.</p>

<h4 id="flags-26">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="wruflags">Wruflags</h3>

<p>Write all user flags.</p>

<h4 id="wruflags-src1-src2">wruflags Src1, Src2</h4>
<p>user flags # Src1 ^ Src2</p>

<p>Set the user level flags to the exclusive or of the Src1 and Src2 registers.</p>

<h4 id="wruflagsi-src1-imm">wruflagsi Src1, Imm</h4>
<p>user flags # Src1 ^ Imm</p>

<p>Set the user level flags to the exclusive or of the Src1 register and the immediate Imm.</p>

<h4 id="flags-27">Flags</h4>
<p>See above.</p>

<h3 id="rdip">Rdip</h3>

<p>Read the instruction pointer.</p>

<h4 id="rdip-dest">rdip Dest</h4>
<p>Dest # rIP</p>

<p>Set the Dest register to the current value of rIP.</p>

<h4 id="flags-28">Flags</h4>
<p>This microop does not set any flags.</p>

<h3 id="wrip">Wrip</h3>

<p>Write the instruction pointer.</p>

<h4 id="wrip-src1-src2">wrip Src1, Src2</h4>
<p>rIP # Src1 + Src2</p>

<p>Set the rIP to the sum of the Src1 and Src2 registers. This causes a macroop branch at the end of the current macroop.</p>

<h4 id="wripi-src1-imm">wripi Src1, Imm</h4>
<p>micropc # Src1 + Imm</p>

<p>Set the rIP to the sum of the Src1 register and immediate Imm. This causes a macroop branch at the end of the current macroop.</p>

<h4 id="flags-29">Flags</h4>
<p>This microop does not set any flags. It is optionally predicated.</p>

<h3 id="chks">Chks</h3>
<p>Check selector.</p>

<p>Not yet implemented.</p>

<h1 id="loadstore-ops">Load/Store Ops</h1>

<h3 id="ld">Ld</h3>
<p>Load.</p>
<h4 id="ld-data-seg-sib-disp">ld Data, Seg, Sib, Disp</h4>
<p>Loads the integer register Data from memory.</p>

<h3 id="ldf">Ldf</h3>
<p>Load floating point.</p>
<h4 id="ldf-data-seg-sib-disp">ldf Data, Seg, Sib, Disp</h4>
<p>Loads the floating point register Data from memory.</p>

<h3 id="ldm">Ldm</h3>
<p>Load multimedia.</p>
<h4 id="ldm-data-seg-sib-disp">ldm Data, Seg, Sib, Disp</h4>
<p>Load the multimedia register Data from memory.
This is not implemented and may never be.</p>

<h3 id="ldst">Ldst</h3>
<p>Load with store check.</p>
<h4 id="ldst-data-seg-sib-disp">Ldst Data, Seg, Sib, Disp</h4>
<p>Load the integer register Data from memory while also checking if a store to that location would succeed.
This is not implemented currently.</p>

<h3 id="ldstl">Ldstl</h3>
<p>Load with store check, locked.</p>
<h4 id="ldst-data-seg-sib-disp-1">Ldst Data, Seg, Sib, Disp</h4>
<p>Load the integer register Data from memory while also checking if a store to that location would succeed, and also provide the semantics of the “LOCK” instruction prefix.
This is not implemented currently.</p>

<h3 id="st">St</h3>
<p>Store.</p>
<h4 id="st-data-seg-sib-disp">st Data, Seg, Sib, Disp</h4>
<p>Stores the integer register Data to memory.</p>

<h3 id="stf">Stf</h3>
<p>Store floating point.</p>
<h4 id="stf-data-seg-sib-disp">stf Data, Seg, Sib, Disp</h4>
<p>Stores the floating point register Data to memory.</p>

<h3 id="stm">Stm</h3>
<p>Store multimedia.</p>
<h4 id="stm-data-seg-sib-disp">stm Data, Seg, Sib, Disp</h4>
<p>Store the multimedia register Data to memory.
This is not implemented and may never be.</p>

<h3 id="stupd">Stupd</h3>
<p>Store with base update.</p>
<h4 id="stupd-data-seg-sib-disp">Stupd Data, Seg, Sib, Disp</h4>
<p>Store the integer register Data to memory and update the base register.</p>

<h3 id="lea">Lea</h3>
<p>Load effective address.</p>
<h4 id="lea-data-seg-sib-disp">lea Data, Seg, Sib, Disp</h4>
<p>Calculates the address for this combination of parameters and stores it in Data.</p>

<h3 id="cda">Cda</h3>
<p>Check data address.</p>
<h4 id="cda-seg-sib-disp">cda Seg, Sib, Disp</h4>
<p>Check whether the data address is valid.
This is not implemented currently.</p>

<h3 id="cdaf">Cdaf</h3>
<p>CDA with cache line flush.</p>
<h4 id="cdaf-seg-sib-disp">cdaf Seg, Sib, Disp</h4>
<p>Check whether the data address is valid, and flush cache lines
This is not implemented currently.</p>

<h3 id="cia">Cia</h3>
<p>Check instruction address.</p>
<h4 id="cia-seg-sib-disp">cia Seg, Sib, Disp</h4>
<p>Check whether the instruction address is valid.
This is not implemented currently.</p>

<h3 id="tia">Tia</h3>
<p>TLB invalidate address</p>
<h4 id="tia-seg-sib-disp">tia Seg, Sib, Disp</h4>
<p>Invalidate the tlb entry which corresponds to this address.
This is not implemented currently.</p>

<h1 id="load-immediate-op">Load immediate Op</h1>

<h3 id="limm">Limm</h3>
<h4 id="limm-dest-imm">limm Dest, Imm</h4>
<p>Stores the 64 bit immediate Imm into the integer register Dest.</p>

<h1 id="floating-point-ops">Floating Point Ops</h1>

<h3 id="movfp">Movfp</h3>
<h4 id="movfp-dest-src">movfp Dest, Src</h4>
<p>Dest # Src</p>

<p>Move the contents of the floating point register Src into the floating point register Dest.</p>

<p>This instruction is predicated.</p>

<h3 id="xorfp">Xorfp</h3>
<h4 id="xorfp-dest-src1-src2">xorfp Dest, Src1, Src2</h4>
<p>Dest # Src1 ^ Src2</p>

<p>Compute the bitwise exclusive or of the floating point registers Src1 and Src2 and put the result in the floating point register Dest.</p>

<h3 id="sqrtfp">Sqrtfp</h3>
<h4 id="sqrtfp-dest-src">sqrtfp Dest, Src</h4>
<p>Dest # sqrt(Src)</p>

<p>Compute the square root of the floating point register Src and put the result in floating point register Dest.</p>

<h3 id="addfp">Addfp</h3>
<h4 id="addfp-dest-src1-src2">addfp Dest, Src1, Src2</h4>
<p>Dest # Src1 + Src2</p>

<p>Compute the sum of the floating point registers Src1 and Src2 and put the result in the floating point register Dest.</p>

<h3 id="subfp">Subfp</h3>
<h4 id="subfp-dest-src1-src2">subfp Dest, Src1, Src2</h4>
<p>Dest # Src1 - Src2</p>

<p>Compute the difference of the floating point registers Src1 and Src2 and put the result in the floating point register Dest.</p>

<h3 id="mulfp">Mulfp</h3>
<h4 id="mulfp-dest-src1-src2">mulfp Dest, Src1, Src2</h4>
<p>Dest # Src1 * Src2</p>

<p>Compute the product of the floating point registers Src1 and Src2 and put the result in the floating point register Dest.</p>

<h3 id="divfp">Divfp</h3>
<h4 id="divfp-dest-src1-src2">divfp Dest, Src1, Src2</h4>
<p>Dest # Src1 / Src2</p>

<p>Divide Src1 by Src2 and put the result in the floating point register Dest.</p>

<h3 id="compfp">Compfp</h3>
<h4 id="compfp-src1-src2">compfp Src1, Src2</h4>
<p>Compare floating point registers Src1 and Src2.</p>

<h3 id="cvtf_i2d">Cvtf_i2d</h3>
<h4 id="cvtf_i2d-dest-src">cvtf_i2d Dest, Src</h4>
<p>Convert integer register Src into a double floating point value and store the result in the lower part of Dest.</p>

<h3 id="cvtf_i2d_hi">Cvtf_i2d_hi</h3>
<h4 id="cvtf_i2d_hi-dest-src">cvtf_i2d_hi Dest, Src</h4>
<p>Convert integer register Src into a double floating point value and store the result in the upper part of Dest.</p>

<h3 id="cvtf_d2i">Cvtf_d2i</h3>
<h4 id="cvtf_d2i-dest-src">cvtf_d2i Dest, Src</h4>
<p>Convert floating point register Src into an integer value and store the result in the integer register Dest.</p>

<h1 id="special-ops">Special Ops</h1>

<h3 id="fault">Fault</h3>
<p>Generate a fault.</p>
<h4 id="fault-fault_code">fault fault_code</h4>
<p>Uses the C++ code fault_code to allocate a Fault object to return.</p>

<h3 id="lddha">Lddha</h3>
<p>Set the default handler for a fault.
This is not implemented currently.</p>

<h3 id="ldaha">Ldaha</h3>
<p>Set the alternate handler for a fault
This is not implemented currently.</p>

<h1 id="sequencing-ops">Sequencing Ops</h1>
<p>These microops are used for control flow withing microcode</p>

<h3 id="br">Br</h3>

<p>Microcode branch. This is never considered the last microop of a sequence. If it appears at the end of a macroop, it is assumed that it branches to microcode in the ROM.</p>

<h4 id="br-target">br target</h4>
<p>micropc # target</p>

<p>Set the micropc to the 16 bit immediate target.</p>

<h4 id="flags-30">Flags</h4>
<p>This microop does not set any flags. It is optionally predicated.</p>

<h3 id="eret">Eret</h3>

<p>Return from emulation. This instruction is always considered the last microop in a sequence. When executing from the ROM, it is the only way to return to normal instruction decoding.</p>

<h4 id="eret-1">eret</h4>

<p>Return from emulation.</p>

<h4 id="flags-31">Flags</h4>
<p>This microop does not set any flags. It is optionally predicated.</p>

  <br>

  <!-- RETRIVE PREVIOUS PAGE LINK -->
  
    
  
    
  
    
  
    
  

  <!-- RETRIEVE NEXT PAGE LINK -->
  
    
  
    
  
    
  
    
  


  <div class="navbuttons">
    
      <a href=""><button type="button" class="btn btn-outline-primary">PREVIOUS</button></a>
    

    
      <a href=""><button type="button" class="btn btn-outline-primary">NEXT</button></a>
    
  </div>
</div>

	</main>
	<footer class="page-footer">
	<div class="container">
		<div class="row">

			<div class="col-12 col-sm-4">
				<p>gem5</p>
				<p><a href="/about">About</a></p>
				<p><a href="/publications">Publications</a></p>
				<p><a href="/contributing">Contributing</a></p>
				<p><a href="/governance">Governance</a></p>
			<br></div>

			<div class="col-12 col-sm-4">
				<p>Docs</p>
				<p><a href="/documentation">Documentation</a></p>
				<p><a href="http://gem5.org/Documentation">Old Documentation</a></p>
				<p><a href="https://gem5.googlesource.com/public/gem5">Source</a></p>
			<br></div>

			<div class="col-12 col-sm-4">
				<p>Help</p>
				<p><a href="/search">Search</a></p>
				<p><a href="/mailing_lists">Mailing Lists</a></p>
				<p><a href="https://gem5.googlesource.com/public/gem5-website/+/refs/heads/master/README.md">Website Source</a></p>
			<br></div>

		</div>
	</div>
</footer>


	<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
	<script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>

	<script>
	  // When the user scrolls down 20px from the top of the document, show the button
	  window.onscroll = function() {scrollFunction()};

	  function scrollFunction() {
	      if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 20) {
	          document.getElementById("myBtn").style.display = "block";
	      } else {
	          document.getElementById("myBtn").style.display = "none";
	      }
	  }

	  // When the user clicks on the button, scroll to the top of the document
	  function topFunction() {
	      document.body.scrollTop = 0;
	      document.documentElement.scrollTop = 0;
	  }

		import commentBox from 'commentbox.io';
		// or
		const commentBox = require('commentbox.io');
		// or if using the CDN, it will be available as a global "commentBox" variable.

		commentBox('my-project-id');

	</script>

</body>


</html>
